package com.xiaoyy.sso.core.dao.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 组织表
 * </p>
 *
 * @author chenzh
 * @since 2020-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SYS_ORG")
@ApiModel(value="SysOrg对象", description="组织表")
public class SysOrg extends Model<SysOrg> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "组织id")
    @TableId(value = "ORG_ID", type = IdType.INPUT)
    private String orgId;

    @ApiModelProperty(value = "组织编码")
    @TableField("ORG_CODE")
    private String orgCode;

    @ApiModelProperty(value = "组织名称")
    @TableField("ORG_NAME")
    private String orgName;

    @ApiModelProperty(value = "组织类型 ")
    @TableField("ORG_TYPE")
    private String orgType;

    @ApiModelProperty(value = "上级组织id")
    @TableField("PARENT_ID")
    private String parentId;

    @ApiModelProperty(value = "联系人")
    @TableField("CONTACT")
    private String contact;

    @ApiModelProperty(value = "联系人手机")
    @TableField("CELLPHONE")
    private String cellphone;

    @ApiModelProperty(value = "联系人电话")
    @TableField("PHONE")
    private String phone;

    @ApiModelProperty(value = "级别")
    @TableField("RATE")
    private Integer rate;

    @ApiModelProperty(value = "排序号")
    @TableField("ORDER_NO")
    private Integer orderNo;

    @ApiModelProperty(value = "地址")
    @TableField("ADDRESS")
    private String address;

    @ApiModelProperty(value = "有效状态 0 禁用 1启用")
    @TableField("STATUS")
    private String status;

    @ApiModelProperty(value = "描述")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "是否虚拟组织 0否 1是")
    @TableField("FICTITIOUS")
    private String fictitious;

    @ApiModelProperty(value = "主管单位")
    @TableField("MAIN_DEPT_ID")
    private String mainDeptId;

    @ApiModelProperty(value = "行政区划")
    @TableField("AREA_CODE")
    private String areaCode;

    @ApiModelProperty(value = "是否 树虚拟节点 0 否 1 是")
    @TableField("TREE_FLAG")
    private String treeFlag;

    @ApiModelProperty(value = "是否内部科室标志 0 否 1 是")
    @TableField("INSIDE_FLAG")
    private String insideFlag;

    @ApiModelProperty(value = "是否生成登入账号 0 未生成 1 已生成")
    @TableField("HAS_ACCOUNT")
    private String hasAccount;

    @ApiModelProperty(value = "单位性质 1 机关单位 2 事业单位 3国有企业 4民营企业")
    @TableField("ORG_PRO")
    private String orgPro;
    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("CREDIT_CODE")
    private String creditCode;
    @ApiModelProperty(value = "创建人")
    @TableField("CREATE_NAME")
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATE_NAME")
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField("DEL")
    private String del;


    @Override
    protected Serializable pkVal() {
        return this.orgId;
    }

}
